import request from '@/sheep/request';

export default {
    //报销申请
	reimburseAddAPI: (data) =>
        request({
            url: 'api/reimburse/add',
            method: 'POST',
            data,
            custom: {
                showSuccess: false,
                successMsg: '',
                showError: true,
                errorMsg: '',
                showLoading: false,
                loadingMsg: '加载中',
                auth: true,
            },
        }),
    //报销详情
	reimburseViewAPI: (params) =>
		request({
			url: 'api/reimburse/view',
			method: 'GET',
			params,
			custom: {
				showSuccess: false,
                successMsg: '',
                showError: true,
                errorMsg: '',
                showLoading: true,
                loadingMsg: '加载中',
                auth: true,
			},
        }),
    // 报销列表
    reimburseIndexAPI: (params) =>
		request({
			url: 'api/reimburse/index',
			method: 'GET',
			params,
			custom: {
				showSuccess: false,
                successMsg: '',
                showError: true,
                errorMsg: '',
                showLoading: true,
                loadingMsg: '加载中',
                auth: true,
			},
        }),
    // 审批列表
    reimburseApprove_listAPI: (params) =>
		request({
			url: 'api/reimburse/approve_list',
			method: 'GET',
			params,
			custom: {
				showSuccess: false,
                successMsg: '',
                showError: true,
                errorMsg: '',
                showLoading: true,
                loadingMsg: '加载中',
                auth: true,
			},
		}),
		 	//报销审批通过
	getReimbursePass: (params) =>
    request({
        url: 'api/reimburse/pass',
        method: 'GET',
        params,
        custom: {
            showSuccess: true,
            successMsg: '',
            showError: true,
            errorMsg: '',
            showLoading: false,
            loadingMsg: '加载中',
            auth: true,
        },
    }),
//报销审批拒绝
postReimbursRefuse: (params) =>
    request({
        url: 'api/reimburse/refuse',
        method: 'POST',
        params,
        custom: {
            showSuccess: true,
            successMsg: '',
            showError: true,
            errorMsg: '',
            showLoading: false,
            loadingMsg: '加载中',
            auth: true,
        },
    }),
};